package com.updateImage;

import net.coobird.thumbnailator.Thumbnails;
import net.coobird.thumbnailator.geometry.Positions;

import javax.imageio.ImageIO;
import java.io.File;
import java.io.IOException;

public class test2 {
    public static void main(String[] args){
        File file = new File("D:\\图片素材\\第二家店铺图片\\主图修改\\背景图\\1.jpg");
        try {
            Thumbnails.of("D:\\图片素材\\第二家店铺图片\\主图修改\\背景图\\1.jpg").size(ImageIO.read(file).getHeight(), ImageIO.read(file).getWidth()).watermark(Positions.BOTTOM_RIGHT, ImageIO.read(new File("D:\\图片素材\\Fecheiws Store\\kuangjia\\01-001 Audi A3 2003 - 2013_43_17_536_308_.png")), 1f)
                    .outputQuality(1f).toFile("D:\\图片素材\\第二家店铺图片\\主图修改\\结果\\1.jpg");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
